import request from '@/utils/request';

export function getWorkOrderListAPI(params:any) {
    return request({ 
        url: '/workorder/work/servicePublishPage', 
        method: 'get', 
        params: params 
    });
}


export function getWorkOrderInfoAPI(id:string) {
    return request({ 
        url: `/workorder/work/getById?id=${id}`, 
        method: 'get', 
    });
}

export function getUserListAPI(deptId:string) {
    
    return request({ 
        url: `/workorder/work/getUserList?deptId=${deptId}`, 
        method: 'get', 
    });
}


/**分配 */
export function allocationOrderAPI(data:any) {
    
    return request({ 
        url: `/workorder/service/assignTasks`, 
        method: 'post',
        data: data
    });
}

/**接受工单 */
export function receiveAPI(data:any) {
    return request({ 
        url: `/workorder/work/takeOrders`, 
        method: 'post',
        data: data
    });
}


